import Vue from 'vue'
import Router from 'vue-router'

import D3 from '@/components/d3'
import Cy from '@/components/cy'

const routers = [
    // 不存在的页面 重定向到主页
    {
        path: '*',
        redirect: '/'
    },
    {
        path: '/',
        component: D3
    },
    {
        path: '/cy',
        component: Cy
    }
]

const router = new Router({
    linkActiveClass: 'active',
    routes: routers,
    mode: 'history'
})

Vue.use(Router)

export default router
